/*
 * SwingString.h  0.4.0 / Nov 17, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#ifndef SWINGSTRING_H
#define SWINGSTRING_H

#include "Cute4jCore.h"
#include "JNISwingWrapper.h"

// SwingString Class. ----------------------------------------------------------

/*!
 * \brief Swing String.
 *
 * \author Slobodan Vrkacevic
 * \version 0.4.0
 */
class CUTE4J_EXPORT SwingString : public QStringAdapter
{
public:
  inline SwingString(jstring str);
public:
  static jstring toJString(const QString &str);
};

// SwingString :: Inline Constructor. ------------------------------------------

/*!
 * \brief Constructs new SwingString object.
 *
 * \param str the Java string object
 */
inline SwingString::SwingString(jstring str)
  : QStringAdapter(SWING_ENV, str)
{
  // empty constructor body
}

#endif // SWINGSTRING_H
